<include file="Public/head" />
<include file="Public/common_header" />
<script src="http://img1.isou365.cn/paimai/yunying/js/global.js"></script>
<div class="mian">
    <include file="Public/sidebar" menu="clcwht.yetx"  />
    <div class="mianR">
        <h3 class="yonghu">提现详情</h3>
        <div class="chezhu-xinxi">
            <div class="xinxi-conter xinxi-conter1">
                <h4>用户信息</h4>
                <ul>
                    <li class="clearfix">
                        <em>个人ID</em>
                        <em class="name-text1">{$user.user_id}</em>
                        <em>账号</em>
                        <em class="name-text">{$user.mobile}</em>
                    </li>
                    <li class="clearfix">
                        <em>姓名</em>
                        <em class="name-text1">{$user.real_name}</em>
                        <em>身份证号</em>
                        <em class="name-text">{$user.icard}</em>
                    </li>
                    <li class="clearfix">
                        <em>状态</em>
                        <em class="name-text1">{$user['status']==1 ? '正常' : '冻结'}</em>

                    </li>
                </ul>
            </div>
            <br/>
            <div class="xinxi-conter xinxi-conter1">
                <h4>提现信息</h4>
                <ul>
                    <li class="clearfix">
                        <em>提现开户行</em>
                        <em class="name-text1">{$cash.bank}</em>
                        <em>提现银行卡号</em>
                        <em class="name-text">{$cash.card}</em>
                    </li>
                    <li class="clearfix">
                        <em>提现金额</em>
                        <em class="name-text1">{:number_format($cash['amount'],2)} 元</em>
                        <em>创建时间</em>
                        <em class="name-text">{$cash.create_time|date="Y-m-d H:i:s", ###}</em>
                    </li>
                </ul>
            </div>
            <br/>
        </div>
        <!--提现结果-->
        <h3 class="yonghu">提现结果</h3>
        <div class="yuyue">
            <ul>
                <li class="yuCurrent" data-id="1" >提现成功</li>
                <li data-id="2">提现失败</li>
            </ul>
            <input type="hidden" id="result" value="1"/>
        </div>

        <div class="listBox">
            <div class="yuList">
                <div class="xuanzhe">
                    <div class="yongBtn">
                        <input class="queding" type="button"  value="确定" />
                        <input name="取消" onclick="history.back(-1)" type="reset" class="quxiao" value="取消"/>
                    </div>
                </div>
            </div>
            <div class="yuList" style="display: none;">
                <div class="xuanzhe1">
                    <ul>
                        <li class="genBtn1 clearfix">
                            <span class="gencuur"><font>开户行信息不完整</font><input value="开户行信息不完整" type="checkbox" /></span>
                            <span class="gencuur"><font>银行卡号不完整</font><input value="银行卡号不完整" type="checkbox" /></span>
                            <span class="gencuur"><font>提现信息与身份信息不一致</font><input value="提现信息与身份信息不一致" type="checkbox" /></span>
                        </li>
                        <li class="clearfix">
                            <span>其他</span>
                            <textarea id="ohter_remark" class="remark"></textarea>
                        </li>
                        <input id="remark" type="hidden" value="">
                    </ul>
                </div>
                <div class="yongBtn">
                    <input type="button" value="确定" class="queding"/>
                    <input name="取消" onclick="history.back(-1)" type="reset" class="quxiao" value="取消"/>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(".yuyue ul li").click(function () {
        $('#result').val($(this).attr('data-id'));
    });

    $('.gencuur input').click(function () {
        $('#remark').val($(this).val());
    });

    $(".remark").blur(function () {
        var remark = $(this).val();
        if (remark != '') {
            $("#remark").val(remark);
        }
    });

    $('.queding').click(function () {
        var id = '{$cash.id}';
        var result = $('#result').val();
        var remark = $("#remark").val();
        if(id<1){
            shibai_alert("参数不正确");
            return false;
        }
        if(result<1){
            shibai_alert("请选择确认结果");
            return false;
        }
        if(result==2 && remark==''){
            shibai_alert("请确认失败原因");
            return false;
        }
        var btn = $(this);
        btn.attr("disabled", "disabled").css({"background": "#999", "border": "none", "color": "#fff"}).val("提交中...");
        $.post('/Cash/doWithdraw',{id:id,result:result,remark:remark},function (data) {
            if (data.code != 200) {
                shibai_alert(data.msg, 1500);
                btn.removeAttr("disabled style").val("确定");
                return false;
            }
            btn_alert(data.msg, 1500, function () {
                window.location.href = "{:U('/Cash/index')}";
            });
        },'json');
    });
</script>
<include file="Public/foot" />